package com.doge;

import java.awt.Point;
import java.util.ArrayList;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.scenes.scene2d.Actor;

public class Character extends Actor
{
	//Main parent;
	
	Tile currentTile;
	TextureRegion textureRegion = null;
	
	public Point target = null;
	public float animationCounter = 0;
	public int currentAnimation = 0;
	public int currentFrameOfAnimation = 0;
	public int spritesheetWidth = 10;
	public ArrayList<ArrayList<Integer>> animations = new ArrayList<ArrayList<Integer>>();	//A list containg the animaton sequences
	
	public int health = 100;
	public int energy = 100; //energy regen 
	public int energyRegen = 15; //energy regen per turn
	public ArrayList<BattleAction> battleActions = new ArrayList<BattleAction>();
	
	public String name = "";
	public int dogeCoins = 0;
	
	public Character(TextureRegion t, Tile position){
		currentTile = position;
		this.textureRegion = t;	
	}
	
	//overwrite
	public BattleAction getNextAction()
	{
		return null;
	}
	
	public void update()
	{
		
	}
	
	public void act(float delta) 
	{
	
		this.update();
	}
	
	public void changeAnimation(int animation) {
			currentAnimation = animation;
			animationCounter = 0;
			currentFrameOfAnimation = 0;
	}
	
	public void setAnimationFrame(int frame) {

	}
	
//	public void draw (SpriteBatch batch, float parentAlpha) {
//		Color color = getColor();
//		batch.setColor(color.g, color.g, color.b, color.a * parentAlpha);
//		batch.draw(textureRegion, getX(), getY()-parent.settings.gridSquareSize-parent.settings.scroll, getOriginX(), getOriginY(), getWidth(), getHeight(), getScaleX(), getScaleY(), getRotation());
//		//Textures.blood.draw(batch);
//	}

	
}
